import request from "../http/axios";

// 查询历史报警
export function listAlarm(params) {
  return request({
    url: "/history_alarm",
    method: "post",
    params: params,
  });
}

// 获取历史曲线
export function getHistoryChart(params, queryStr) {
  return request({
    url: "/history_status?" + queryStr,
    method: "post",
    params: params,
  });
}
// 获取回放历史曲线
export function getRecordChart(params, queryStr) {
  return request({
    url: "/history_record?" + queryStr,
    method: "post",
    params: params,
  });
}

// 获取模式
export function listModel() {
  return request({
    url: "/script",
    method: "get",
  });
}

// 开启
export function run(params) {
  return request({
    url: "/start_script",
    method: "post",
    params: params,
  });
}

// 停止
export function stop() {
  return request({
    url: "/stop_run",
    method: "post",
  });
}

// 时间下拉
export function sjXl() {
  return request({
    url: "/record_list",
    method: "get",
  });
}
